﻿using LightWadf.Core.Result;
using Microsoft.AspNetCore.Http;

namespace LightWadf.Core.Filter
{
    public class RestfulFilter : IFilter
    {
        public override object BeforeProcess(HttpContext context)
        {
            return null;
        }

        public override void AfterProcess(HttpContext context, ref object result)
        {
            if(result != null)
                result = new JsonResult(result);
        }
    }
}
